<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<style type="text/css">
    /*border:1px solid #000;*/
    * { margin: 0px; padding: 0px; }

    #blank { width: 1024px; height: 50px; }

    #header, #main { width: 1024px; margin: 0 auto; }

    #main { margin-top: 50px; }

    #header { text-align: center; font-family: 新宋体; font-size: 24px; color: darkcyan; overflow: hidden; }

    input {
        border: 1px solid #000;
        width: 80px;
        cursor: pointer;
        background-color: greenyellow;
    }

    .spanCountReds{
        color: red;
    }

    #divBack { float: right; }

    #tableSchedule { text-align: center; }
</style>
<script type="text/javascript">

</script>
<div id="blank">
</div>
<div id="header">
    个人日程
    <div id="divBack"><input type="button" name="buttonBack" value="返回"
                             onclick="window.location.href='/examStudent/grid.do'">
    </div>
</div>
<div id="main">
    <table id="tableSchedule" width="1024" border="1" cellpadding="1" cellspacing="0">
        <tr>
            <td>日期</td>
            <td>时间</td>
            <td>课程名称</td>
            <td>授课老师</td>
            <td>已选课人数/设定人数</td>
        </tr>
        <c:forEach var="mapCounts" items="${mapCounts}" varStatus="status">
            <c:if test="${mapCounts.key==1}">
                <c:set var="mondayCount" value="${mapCounts.value}" ></c:set>
            </c:if>
            <c:if test="${mapCounts.key==2}">
                <c:set var="tuesdayCount" value="${mapCounts.value}" ></c:set>
            </c:if>
            <c:if test="${mapCounts.key==3}">
                <c:set var="wednesdayCount" value="${mapCounts.value}" ></c:set>
            </c:if>
            <c:if test="${mapCounts.key==4}">
                <c:set var="thursdayCount" value="${mapCounts.value}" ></c:set>
            </c:if>
            <c:if test="${mapCounts.key==5}">
                <c:set var="fridayCount" value="${mapCounts.value}" ></c:set>
            </c:if>
            <c:if test="${mapCounts.key==6}">
                <c:set var="saturdayCount" value="${mapCounts.value}" ></c:set>
            </c:if>
        </c:forEach>
        <c:forEach var="examScMondays" items="${examScMondays}" varStatus="status">
            <c:set var="examScMondaysIndex" value="${status.index}"></c:set>
        </c:forEach>
        <tr>
            <c:forEach var="examScMondays" items="${examScMondays}" varStatus="status" begin="0" end="0">
                <td rowspan="<c:out value='${examScMondaysIndex+2}'/> ">
                    周一
                </td>
            </c:forEach>

        </tr>
        <c:forEach var="examScMondays" items="${examScMondays}" varStatus="status">
            <tr>
                <td>${examScMondays.course.startTime}-${examScMondays.course.endTime}</td>
                <td>${examScMondays.course.name}</td>
                <td>${examScMondays.course.techer}</td>
                <td><span class="spanCountReds"><c:out value="${mondayCount}"/></span>/${examScMondays.course.limitCount}</td>
            </tr>
        </c:forEach>
        <c:forEach var="examScTuesdays" items="${examScTuesdays}" varStatus="status">
            <c:set var="examScTuesdaysIndex" value="${status.index}"></c:set>
        </c:forEach>
        <tr>
            <c:forEach var="examScTuesdays" items="${examScTuesdays}" varStatus="status" begin="0" end="0">
                <td rowspan="<c:out value='${examScTuesdaysIndex+2}'/>">
                    周二
                </td>
            </c:forEach>
        </tr>
        <c:forEach var="examScTuesdays" items="${examScTuesdays}" varStatus="status">
            <tr>
                <td>${examScTuesdays.course.startTime}-${examScTuesdays.course.endTime}</td>
                <td>${examScTuesdays.course.name}</td>
                <td>${examScTuesdays.course.techer}</td>
                <td><span class="spanCountReds"><c:out value="${tuesdayCount}"/></span>/${examScTuesdays.course.limitCount}</td>
            </tr>
        </c:forEach>
        <c:forEach var="examScWednesdays" items="${examScWednesdays}" varStatus="status">
            <c:set var="examScWednesdaysIndex" value="${status.index}"></c:set>
        </c:forEach>
        <tr>
            <c:forEach var="examScWednesdays" items="${examScWednesdays}" varStatus="status" begin="0" end="0">
                <td rowspan="<c:out value='${examScWednesdaysIndex+2}'/>">
                    周三
                </td>
            </c:forEach>

        </tr>
        <c:forEach var="examScWednesdays" items="${examScWednesdays}" varStatus="status">
            <tr>
                <td>${examScWednesdays.course.startTime}-${examScWednesdays.course.endTime}</td>
                <td>${examScWednesdays.course.name}</td>
                <td>${examScWednesdays.course.techer}</td>
                <td><span class="spanCountReds"><c:out value="${wednesdayCount}"/></span>/${examScWednesdays.course.limitCount}</td>
            </tr>
        </c:forEach>
        <c:forEach var="examScThursdays" items="${examScThursdays}" varStatus="status">
            <c:set var="examScThursdaysIndex" value="${status.index}"></c:set>
        </c:forEach>
        <tr>
            <c:forEach var="examScThursdays" items="${examScThursdays}" varStatus="status" begin="0" end="0">
                <td rowspan="<c:out value='${examScThursdaysIndex+2}'/>">
                    周四
                </td>
            </c:forEach>

        </tr>
        <c:forEach var="examScThursdays" items="${examScThursdays}" varStatus="status">
            <tr>
                <td>${examScThursdays.course.startTime}-${examScThursdays.course.endTime}</td>
                <td>${examScThursdays.course.name}</td>
                <td>${examScThursdays.course.techer}</td>
                <td><span class="spanCountReds"><c:out value="${thursdayCount}"/></span>/${examScThursdays.course.limitCount}</td>
            </tr>
        </c:forEach>
        <c:forEach var="examScFridays" items="${examScFridays}" varStatus="status">
            <c:set var="examScFridaysIndex" value="${status.index}"></c:set>
        </c:forEach>
        <tr>
            <c:forEach var="examScFridays" items="${examScFridays}" varStatus="status" begin="0" end="0">
                <td rowspan="<c:out value='${examScFridaysIndex+2}'/>">
                    周五
                </td>
            </c:forEach>
        </tr>
        <c:forEach var="examScFridays" items="${examScFridays}" varStatus="status">
            <tr>
                <td>${examScFridays.course.startTime}-${examScFridays.course.endTime}</td>
                <td>${examScFridays.course.name}</td>
                <td>${examScFridays.course.techer}</td>
                <td><span class="spanCountReds"><c:out value="${fridayCount}"/></span>/${examScFridays.course.limitCount}</td>
            </tr>
        </c:forEach>
        <c:forEach var="examScSaturdays" items="${examScSaturdays}" varStatus="status">
            <c:set var="examScSaturdaysIndex" value="${status.index}"></c:set>
        </c:forEach>
        <tr>
            <c:forEach var="examScSaturdays" items="${examScSaturdays}" varStatus="status" begin="0" end="0">
                <td rowspan="<c:out value='${examScSaturdaysIndex+2}'/>">
                    周六
                </td>
            </c:forEach>
        </tr>
        <c:forEach var="examScSaturdays" items="${examScSaturdays}" varStatus="status">
            <tr>
                <td>${examScSaturdays.course.startTime}-${examScSaturdays.course.endTime}</td>
                <td>${examScSaturdays.course.name}</td>
                <td>${examScSaturdays.course.techer}</td>
                <td><span class="spanCountReds"><c:out value="${saturdayCount}"/></span>/${examScSaturdays.course.limitCount}</td>
            </tr>
        </c:forEach>
    </table>
</div>